﻿using System.Collections.Generic;
using System.Linq;
using SuppKids.Core.Domain;

namespace SuppKids.Core.Reporting.Data
{
	public class MenuRequirementReportData : ReportData
	{
		public MenuRequirementReportData(IEnumerable<DailyMenu> dailyMenus, IEnumerable<Product> allProducts, IEnumerable<GroupData> groupsData)
		{
			DailyMenus = dailyMenus;
			//AllProducts = allProducts.OrderBy(a => a.Name).ToList();
            AllProducts = allProducts.ToList();
			GroupsData = groupsData
                .OrderByDescending(a => a.Group.Name.ToLowerInvariant() == "ясли")
                .ThenByDescending(a => a.Group.Name.ToLowerInvariant() == "сад")
				.ThenBy(a => a.Group.Name)
				.ToList();
		}

		public IEnumerable<DailyMenu> DailyMenus { get; set; }
		public List<Product> AllProducts { get; set; }
		public List<GroupData> GroupsData { get; set; }
	}
}